import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutterapp1/ATBookListWidget.dart';
import 'package:flutterapp1/ATFavWidget.dart';
import 'ATHomeWidget.dart';
import 'dart:ui' as ui; // 调用window拿到route判断跳转哪个界面
import 'ATRootWidget.dart';
//void main() => runApp(MainCtrl());
void main() => runApp(_widgetForRoute(ui.window.defaultRouteName));
Widget _widgetForRoute(String route) {
  //MyUserTool.getInstance();
  switch (route) {
    case 'fav':
      return Fav();
    case 'home':
      return Home();
    case 'more':
      return new ATBookListStatefulWidget(title:'更多');
    default:
      return Root();
  }
}


